Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containers: test privileged mode #17793

Merged

Conversation

ilausuch
Copy link
Contributor

@ilausuch ilausuch commented Sep 18, 2023

Test privileged mode in podman and docker. The command mount -t tmpfs none /mnt
only works in privileged mode because the read-only protection in the default mode

@github-actions
Copy link

Great PR! Please pay attention to the following items before merging:

Files matching lib/**.pm:

  • Consider adding or extending unit tests in t/

This is an automatically generated QA checklist based on modified files.

@ilausuch ilausuch force-pushed the test_containers_privileged branch 11 times, most recently from 72eb17c to 9333095 Compare September 21, 2023 12:56
@ilausuch ilausuch marked this pull request as ready for review September 21, 2023 12:57
tests/containers/privileged_mode.pm Outdated Show resolved Hide resolved
tests/containers/privileged_mode.pm Outdated Show resolved Hide resolved
Copy link
Contributor

@ricardobranco777 ricardobranco777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice template for adding more tests and later rootless privileged too. Some suggestions.

tests/containers/privileged_mode.pm Outdated Show resolved Hide resolved
tests/containers/privileged_mode.pm Outdated Show resolved Hide resolved
tests/containers/privileged_mode.pm Outdated Show resolved Hide resolved
@mloviska
Copy link
Contributor

This is a nice template for adding more tests and later rootless privileged too. Some suggestions.

There are already 2 calls in the rootless_podman. I would also personally vote for the option to put these functions in common.pm and call them in root(less) test cases.

tests/containers/privileged_mode.pm Outdated Show resolved Hide resolved
tests/containers/privileged_mode.pm Outdated Show resolved Hide resolved
tests/containers/privileged_mode.pm Outdated Show resolved Hide resolved
@ilausuch
Copy link
Contributor Author

Thank you all for your reviews

@ilausuch ilausuch force-pushed the test_containers_privileged branch 5 times, most recently from 10d5999 to 5b5271d Compare September 28, 2023 11:02
@ilausuch ilausuch force-pushed the test_containers_privileged branch 4 times, most recently from b0d36e8 to 04a399f Compare September 28, 2023 11:32
@ilausuch
Copy link
Contributor Author

All new VR ready

Copy link
Contributor

@ricardobranco777 ricardobranco777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop -ti. Otherwise LGTM.

tests/containers/privileged_mode.pm Outdated Show resolved Hide resolved
tests/containers/privileged_mode.pm Outdated Show resolved Hide resolved
tests/containers/privileged_mode.pm Outdated Show resolved Hide resolved
Test privileged mode in podman and docker. The command
mount -t tmpfs none /mnt
only works in privileged mode because the read-only protection in
the default mode

https://progress.opensuse.org/issues/135518
@ilausuch
Copy link
Contributor Author

Thanks @ricardobranco777 changes done. Last VR for this change http://openqa.suse.de/tests/12336305

@ricardobranco777 ricardobranco777 merged commit 1f27b84 into os-autoinst:master Sep 28, 2023
7 checks passed
@pdostal
Copy link
Member

pdostal commented Sep 29, 2023

Yesterday on s390x (see example and Slack thread):

ls: cannot access '/dev/bus': No such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants